<!DOCTYPE html>
<!-- saved from url=(0030)https://www.ccspx.com.cn/login -->
<html lang="zh"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="keywords" content="">
	<meta name="description" content="">
	<title>通服云课堂</title>
	<link rel="shortcut icon" href="https://www.ccspx.com.cn/favicon.ico">
	<link href="{{url_for('static',filename='css/login.css') }}" rel="stylesheet">
	<link href="{{url_for('static',filename='css/bootstrap.min.css')}}" rel="stylesheet">
	<link href="{{url_for('static',filename='css/font-awesome.min.css')}}" rel="stylesheet">
	<!--[if lt IE 9]>
	<meta http-equiv="refresh" content="0;ie.html" />
	<![endif]-->
	<link rel="shortcut icon" href="https://www.ccspx.com.cn/favicon.ico">
	<style type="text/css">label.error { position:inherit;  }</style>
	<script src="{{url_for('static',filename='js/hm.js')}}"></script><script>
        if(window.top!==window.self){window.top.location=window.location};
        //实现回车键登录
        function keyLogin(){
            if (event.keyCode==13){ //回车键的键值为13
                login();
            }
        }
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?04f08a1fdecae8accd6731f7066a8d95";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
	</script>
<link rel="stylesheet" href="{{url_for('static',filename='css/laydate.css')}}" id="layuicss-laydate"><link rel="stylesheet" href="{{url_for('static',filename='css/layer.css')}}" id="layuicss-layer"></head>

<body onkeydown="keyLogin();">

	<div class="system-proclamation" style="display: none;">
			<span class="system-proclamation-jump">
				<img class="system-proclamation-img" src="{{url_for('static',filename='img/ico-notice.png')}}"> 【系统通知】
				<span class="system-proclamation-title"></span>
				<img class="system-proclamation-img" src="{{url_for('static',filename='img/ico-right-arrow.png')}}">
			</span>
	</div>
	<script> var ctx = "\/"; </script>
	<script src="{{url_for('static',filename='js/jquery.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/jquery-migrate-1.4.1.min.js')}}"></script>
	<script>
        $(function(){
            var showType = "0";
            if(showType == '0'){
                initSysProclamation();
            }
        });
        function initSysProclamation(){
            $.ajax({
                url: ctx + "system/sysproclamation/show",
                type: "post",
                dataType: "json",
                success: function (result) {
                    if (result.code == '0' && result.data != null && result.data.title != null && result.data.title != '') {
                        $('.system-proclamation-title').html(result.data.title);
                        $('.system-proclamation').show();
                        //添加跳转
                        $('.system-proclamation-jump').click(function(){
                            window.open(ctx + "system/sysproclamation/detail");
                        })
                    }else{
                        $('.system-proclamation').hide();
                    }
                }
            })
        }
	</script>

	<header class="login-header">
		<div class="login-header-inner">
			<!-- logo区域 -->
			<a href="https://www.ccspx.com.cn/index" class="login-header-logo" style="background-image: url(&quot;/static/img/logo.png&quot;);"></a>
		</div>
	</header>
	<div class="login-main" style="background-image: url(&quot;/static/img/login-background.jpg&quot;);">
		<div class="login-banner">
			<div class="login-banner-text" style="background-image: url(&quot;/static/img/login-banner-text.png&quot;);"></div>
			<form id="signupForm">
			<div class="login-pannel">
				<div class="login-title">
					<div>用户登录</div>
					<div class="register"><span onclick="toRegisert()">立即注册</span></div>
				</div>
				<div class="login-info">
					<div class="login-info-row">
						<div class="login-info-loginname-div"></div>
						<input type="text" name="username" id="username" placeholder="用户名/手机号" maxlength="50" title="账号/邮箱" class="login-info-loginname" required="">
					</div>
					<div class="login-info-row">
						<div class="login-info-password-div"></div>
						<input type="password" name="password" id="password" autocomplete="off" placeholder="密码" maxlength="50" title="密码" class="login-info-password" required="">
					</div>
					<div class="login-info-row">
						<div class="login-info-checkcode-div"></div>
						<input type="text" name="validateCode" id="validateCode" placeholder="验证码" maxlength="4" title="验证码" class="login-info-checkcode">
						<img class="login-info-checkcode-img" alt="看不清，换一张" src="{{url_for('static',filename='img/captchaImage.jpg')}}">
					</div>
                    <div class="login-info-row login-padding-bottom8">
                        <input type="button" id="btnSubmit" data-loading="正在验证登录，请稍后..." value="登录" onclick="login()" class="login-info-button">
                    </div>
                    <div class="login-info-row">
<!--                    	<a href="https://www.ccspx.com.cn/phoneLogin" class="login-way-change">手机动态码登录</a>-->
                        <a onclick="toSmsRegisert()" class="login-way-change">手机动态码登录</a>
                        <a onclick="forgetPwd()" class="login-forget-pwd-div">忘记密码</a>
                    </div>
				</div>
			</div>
		</form>
		</div>
	</div>



	<script>
		var ctx = "\/";
        function pathToUrl (path) {
            if (path.indexOf('http://') == 0 || path.indexOf('https://') == 0) {
                return path;
            }
            return ctx + path;
        }
	</script>
	<script src="{{url_for('static',filename='js/jquery.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/jquery-migrate-1.4.1.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/bootstrap.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/laydate.js')}}"></script>
	<script src="{{url_for('static',filename='js/layer.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/icheck.js')}}"></script>

	<script src="{{url_for('static',filename='js/paging.js')}}"></script>
	<script src="{{url_for('static',filename='js/comment.js')}}"></script>



	<div class="login-footer">
		<p>
			© 2020 All Rights Reserved&nbsp;&nbsp;<span>中博信息技术研究院有限公司 版权所有</span> &nbsp;&nbsp;<a target="_blank" href="https://beian.miit.gov.cn/" class="icp-number-black">苏ICP备09068602号-10</a>
		</p>
	</div>
	<script>
        $(function(){
            $.ajax({
                url: ctx + "common/getTenantConfig",
                ansyc:false,
                data: "",
                type: "post",
                success: function(result) {
                    if(result!=null && result.code == '0'){
                        var footerHtml = $('.login-footer').html();
                        footerHtml = footerHtml.replace("$company$", result.company);
                        footerHtml = footerHtml.replace("$icp-number$",result.icpNumber);
                        footerHtml = footerHtml.replace("$icp-url$", "https:\/\/beian.miit.gov.cn\/");
                        $('.login-footer').html(footerHtml);
                    }
                }
            });
        })
	</script>

	<!-- 验证插件 -->

	<script src="{{url_for('static',filename='js/jquery.validate.min.js')}}"></script>
	<script src="{{url_for('static',filename='js/jquery.validate.extend.js')}}"></script>
	<script src="{{url_for('static',filename='js/messages_zh.min.js')}}"></script>

	<script src="{{url_for('static',filename='js/jquery.blockUI.js')}}"></script>


	<script>
        var ctx = "\/";
        var captchaType = "char";
        if (top != this) {
            top.location = this.location;
        }
        window.onload=function(){
            var theUA = window.navigator.userAgent.toLowerCase();
            if ((theUA.match(/msie\s\d+/) && theUA.match(/msie\s\d+/)[0]) || (theUA.match(/trident\s?\d+/) && theUA.match(/trident\s?\d+/)[0])) {
                var ieVersion = theUA.match(/msie\s\d+/)[0].match(/\d+/)[0] || theUA.match(/trident\s?\d+/)[0];

                //不支持ie11以下
                if (ieVersion < 11) {
                    top.window.location.href = ctx+"common/error_browser";
                }
                //不支持360兼容模式
                if((window.navigator.userProfile+'')=='null' || (window.navigator.userProfile+'')=='undefined' ){
                    top.window.location.href = ctx+"common/error_browser";
                }
            }
            else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
                top.window.location.href = ctx+"common/error_browser";
            }
        };


        $(function() {
            validateKickout();
            $('.login-info-checkcode-img').click(function() {

                var url ="https:\/\/www.ccspx.com.cn\/" + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
				$(".login-info-checkcode-img").attr("src", url);
            });

            var logoPic = "https:\/\/www.ccspx.com.cn\/img\/logo.png";
            if(logoPic!=''){
                $('.login-header-logo').css("background-image","url("+pathToUrl(logoPic)+")");
            }else{
                $('.login-header-logo').css("background-image","url("+ctx+"img/logo.png)");
            }
            var bgPic = "https:\/\/www.ccspx.com.cn\/img\/login-background.jpg";
            if(bgPic != ''){
				$('.login-main').css("background-image","url("+pathToUrl(bgPic)+")");
            }else{
                $('.login-main').css("background-image","url("+ctx+'img/login-background.jpg)');
            }
            var fgPic = "https:\/\/www.ccspx.com.cn\/zbiticss-http\/upload\/2020\/08\/11\/c4f6335ee7d12feaf31004fe4c0c46ab.png";
            if(fgPic != ''){
                $('.login-banner-text').css("background-image","url("+pathToUrl(fgPic)+")");
            }else{
                $('.login-banner-text').css("background-image","url("+ctx+"img/login-background-text.png)");
            }
        });


        function login() {
            var isUpperLimit = 0;
            //校验人数是否上限
            $.ajax({
                url: ctx + "monitor/online/selectUserOnlineNums",
                type: 'POST',
                async: false,
                success: function (res) {
					if(res.code == '0'){
					    var nums = res.userOnlineNums;
					    var maxNums = "4000";
					    if(nums >= maxNums){
					        var msg = "\u5F53\u524D\u8BBF\u95EE\u4EBA\u6570\u8F83\u591A\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF01";
                            layer.alert(msg);
                            isUpperLimit = 1;
					    }
					}
                },
                fail: function () {
                    return;
                }
            })
			if(isUpperLimit == 0){
                validateRule();
                if($("#signupForm").validate().form()){
                    $.blockUI({ message: "登录验证中..." });
                    var username = $("input[name='username']").val();
                    var password = $("input[name='password']").val();
                    var validateCode = $("input[name='validateCode']").val();
                    $.ajax({
                        type: "post",
                        url: ctx + "login",
                        data: {
                            "username": username,
                            "password": password,
                            "validateCode" : validateCode,
                            "rememberMe" : false
                        },
                        success: function(r) {
                            if (r.code == 0) {
                                $.unblockUI();
                               window.location.href = ctx + "forgetPwd";
                            } else {
								$.unblockUI();
								layer.msg(r.msg)
<!--								$('.login-info-checkcode-img').click();-->
								$(".login-info-checkcode").val("");
                            }
                        }
                    });
                }
			}
        }

        function validateRule() {
            var icon = "<i class='fa fa-times-circle'></i> ";
            $("#signupForm").validate({
                rules: {
                    username: {
                        required: true
                    },
                    password: {
                        required: true
                    }
                },
                messages: {
                    username: {
                        required: icon + "请输入您的用户名/手机号",
                    },
                    password: {
                        required: icon + "请输入您的密码",
                    }
                }
            })
        }

        function validateKickout() {
            if (getParam("kickout") == 1) {
                layer.alert("<font color='red'>您已在别处登录，请您修改密码或重新登录</font>", {
                        icon: 0,
                        title: "系统提示"
                    },
                    function(index) {
                        //关闭弹窗
                        layer.close(index);
                        if (top != self) {
                            top.location = self.location;
                        } else {
                            var url  =  location.search;
                            if (url) {
                                var oldUrl  = window.location.href;
                                var newUrl  = oldUrl.substring(0,  oldUrl.indexOf('?'));
                                self.location  = newUrl;
                            }
                        }
                    });
            }
        }

        function getParam(paramName) {
            var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return decodeURI(r[2]);
            return null;
        }

        //跳转忘记密码页面
        function forgetPwd() {
            window.location.href = ctx + "forgetPwd";
        }

        function toRegisert() {
            window.location.href = ctx + "sysuser/register";
        }

        function toSmsRegisert() {
            window.location.href = ctx + "sms/register";
        }
	</script>


</body></html>